// Copyright 2012 The Glue BSF Library Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS-IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

goog.provide('glue.Event');
goog.provide('glue.EventType');

goog.require('goog.events.Event');

/**
 * Enum for the types of events glue fires above the base Closure Component Events
 * 
 * @enum {String}
 */
glue.EventType = {	
	NAVIGATE:'navigate',	
	REVALIDATE:'revalidate'
};

/**
 * Subclass of the goog.events.Event object.  Add the ability to associate data with an event.
 * 
 * @param {String} type The type of the event
 * @param {*=} opt_data The optional data to be fired along with the event.
 * @param {*=} opt_target  The currentTarget of the event.
 * 
 * @extends goog.events.Event
 * @constructor
 */
glue.Event = function(type,opt_data,opt_target){
	goog.base(this);
	this.type = type;
	this.data = opt_data; 
	if(opt_target !== undefined){
		this.target = opt_target;
	}
}
goog.inherits(glue.Event,goog.events.Event)
